package com.js.foodordersystem.entity;

import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 存储用户购物车信息(Cart)实体类
 *
 * @author makejava
 * @since 2025-01-09 10:52:46
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Cart implements Serializable {
    private static final long serialVersionUID = 850775321948423432L;
    /**
     * 购物车ID，主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long cartId;
    /**
     * 用户ID，关联用户表
     */
    private Long userId;
    /**
     * 菜品ID，关联菜品表
     */
    private Long dishId;
    /**
     * 购物车中菜品数量
     */
    private Integer quantity;
    /**
     * 记录创建时间
     */
    private Date createdAt;
    /**
     * 记录更新时间
     */
    private Date updatedAt;


}

